package state;

import objects.test.*;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;
import util.level.Room;

public class TestState extends Room
{
	public void init(GameContainer gc,StateBasedGame sbg) throws SlickException
	{
		super.init(gc,sbg);
		super.changeLevel("dat/lvl/data.xml");
		
		//view code
		setViewSize(320,240);
		setViewOffset(16,16);
		
		//collision test code
		for(int x=0;x<640-32;x+=48)
			for(int y=0;y<480-32;y+=48)
			{
				BounceBlock b;
				getBag().add(b=new BounceBlock(x,y,32,32,(float)(-2+Math.random()*4),(float)(-2+Math.random()*4)));
				if(x==240 && y==240)
					setViewObject(b);
			}
	}
}